[Communication] add chat and identity command groups#5208
[Communication] add chat and identity command groups#5208kairu-ms merged 29 commits intoAzure:mainfrom mayssamm:main
Conversation
… add identity remove-access-tokens
- create-user - delete-user - get-token-for-teams-user
|
Communication |
… communication commands
| helps['communication identity create-user'] = """ | ||
| type: command | ||
| short-summary: "Craetes a new ACS identity." | ||
| examples: | ||
| - name: create-user | ||
| text: |- | ||
| az communication identity create-user | ||
| """ |
There was a problem hiding this comment.
Please rename communication identity create-user by communication identity user create
| az communication identity create-user | ||
| """ | ||
|
|
||
| helps['communication identity delete-user'] = """ |
There was a problem hiding this comment.
Please rename communication identity delete-user by communication identity user delete
| helps['communication chat list-threads'] = """ | ||
| type: command | ||
| short-summary: "Gets the list of chat threads of a user." | ||
| examples: | ||
| - name: chat list-threads | ||
| text: |- | ||
| az communication chat list-threads | ||
| """ |
There was a problem hiding this comment.
Please rename communication chat list-threads by communication chat thread list
| helps['communication chat create-thread'] = """ | ||
| type: command | ||
| short-summary: "Creates a chat thread." | ||
| examples: | ||
| - name: chat create-thread | ||
| text: |- | ||
| az communication chat create-thread --topic "chat-topic" | ||
| """ |
There was a problem hiding this comment.
Rename communication chat create-thread by communication chat thread create
| az communication chat delete-thread --thread-id "19:a-bcd=xyz" | ||
| """ | ||
|
|
||
| helps['communication chat list-participants'] = """ |
| c.argument('thread_id', options_list=['--thread-id', '-t'], | ||
| type=str, help='Thread id') | ||
| c.argument('message_id', options_list=['--message-id', '-i'], |
There was a problem hiding this comment.
Why you always add -* for all arguments? It's not recommended. Those short argument alias may conflicted with the global arguments. Please add them only when needed.
There was a problem hiding this comment.
Removed short arguments for most commands.
| with self.command_group('communication phonenumbers', client_factory=cf_communication_phonenumbers, is_preview=True) as g: | ||
| g.communication_custom_command('list-phonenumbers', 'communication_list_phonenumbers', phonenumber_arguments) | ||
| g.communication_custom_command('show-phonenumber', 'communication_show_phonenumber', phonenumber_arguments) |
There was a problem hiding this comment.
Why this command group changed form GA to Preview again?
| g.communication_custom_command('send-sms', 'communication_send_sms') | ||
| sms_arguments = ['connection_string'] | ||
| with self.command_group('communication sms', client_factory=cf_communication_sms, is_preview=True) as g: | ||
| g.communication_custom_command('send-sms', 'communication_send_sms', sms_arguments) |
There was a problem hiding this comment.
Should use send instead of send-sms
There was a problem hiding this comment.
This was already released. Added 'sms send' and marked this as deprecated.
| g.communication_custom_command('show-phonenumber', 'communication_show_phonenumber') | ||
| phonenumber_arguments = ['connection_string'] | ||
| with self.command_group('communication phonenumbers', client_factory=cf_communication_phonenumbers, is_preview=True) as g: | ||
| g.communication_custom_command('list-phonenumbers', 'communication_list_phonenumbers', phonenumber_arguments) |
There was a problem hiding this comment.
Should use list instead of list-phonenumbers
There was a problem hiding this comment.
However as this command already release, you can keep them. But they are availed the naming guideline of azure-cli
There was a problem hiding this comment.
Marked as deprecated as well.
| c.argument('userid', options_list=['--userid', '-u'], type=str, help='ACS identifier') | ||
| c.argument('scopes', options_list=[ | ||
| '--scope', '-s'], nargs='+', help='list of scopes for an access token ex: chat/voip') | ||
| c.argument('user_id', options_list=['--user-id', '-u'], type=str, help='ACS identifier') |
There was a problem hiding this comment.
It's a breaking change to change option names from '--userid', '-u' to '--user-id', '-u'
There was a problem hiding this comment.
Rolled back this renaming.
|
[Release] Update index.json for extension [ communication ] : https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1785968&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally?For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify
src/index.json.